<template>
	<div class="u-general-color">
		<u-navbar :title="Navbar.title" :title-bold="true" title-color="#040503" back-icon-color="#040503"
			:custom-back="comeback" :background="Navbar.background" :border-bottom="false" title-width="380"></u-navbar>
		<div>
			<section>
				<div>
					<div id="imgbox">
						<div>
							<u-swiper :list="imagesList" height="750" border-radius="0"
								@click="showOriginalImage"></u-swiper>
						</div>
					</div>

					<div class="n-price-1">
						<div class="n-price__left price-area u-pl-15">
							<div class="u-fz-26 u-font-bold discount-price" v-html="price"
								v-if="taskInfo.enableRating == '1'"></div>
							<div class="u-fz-26 u-font-bold discount-price" v-else>&yen;{{price}}</div>
							<div class="u-pl-5 discount-tag">
								<u-tag text="推广报酬" mode="dark" size="mini" bg-color="#fc545d"></u-tag>
							</div>
						</div>
						<div class="countdown-area">
							<div class="u-fz-17 u-text-center u-font-bold u-pl-15" style="line-height: 35rpx;">
								{{endTimeContent}}
							</div>
							<div class="u-fz-8 u-text-center u-pl-15" v-if="endTimeContent.indexOf('天后结束') != -1 || endTimeContent.indexOf(':') != -1">距离报名截止仅剩</div>
						</div>
					</div>

					<div class="u-pl-15" v-if="couponTag">
						<u-tag :text="couponText" mode="plain" size="mini" color="#e66142" bg-color="#faede4"
							border-color="#faede4" />
					</div>

					<div class="u-title u-fz-18 u-pb-10 commodity-name">
						<h4 class="tit f-els-2">
							<span class="goods-title-tag u-pr-5" v-if="taskInfo.label">{{taskInfo.label}}</span>
							<span class="middile">{{taskInfo.subject?taskInfo.subject:''}}</span>
						</h4>
					</div>
				</div>
			</section>
		</div>

		<p class="v-sperate"></p>
		<section class="j-block width93">
			<div class="modal-item" @click="showRules">
				<div class="u-fz-20 u-font-bold">
					非常重要！请仔细阅读！
				</div>
				<div style="font-size: smaller;">
					<u-icon :name="iconName" color="#9f9d9e" size="24"></u-icon>
				</div>
			</div>

			<div v-if="show_rule">
				<div class="rule-title">
					推广任务要求
				</div>
				<div class="rule-content">
					<u-parse :html="this.escape2Html2(taskInfo.taskRequirements)"></u-parse>

					<!-- 推广任务要求图片 -->
					<div class="pictrues-box" v-if="taskRequirementsFiles.length > 0">
						<Upload u_appid="evaluation" u_fieldName="taskRequirements" :u_orunid="taskInfo.id" u_type="2"
							:u_readonly="true" :u_initialAttchments="taskRequirementsFiles"
							@receiveAttachmentsData="getTaskRequirementsFiles"></Upload>
					</div>
				</div>

				<div class="rule-title">
					成果提交时间
				</div>
				<div class="rule-content">
					报名后{{taskInfo.submitLimitDays?taskInfo.submitLimitDays:0}}天内，前往【收益-我的待办】提交成果，逾期作废。
					<div class="u-font-bold color-red" v-if="taskInfo.endTime">
						温馨提示：<br>
						活动将在{{taskInfo.endTime}} 23:59:59结束，如有未提交的待办（含返修）请务必在活动结束前处理，逾期作废。<br>
					</div>
				</div>
				
				<div class="rule-title">
					成果验收标准
				</div>
				<div class="rule-content">
					<!-- 成果验收标准 -->
					<u-parse :html="this.escape2Html2(taskInfo.acceptanceCriteria)"></u-parse>

					<!-- 成果验收标准图片 -->
					<div class="pictrues-box" v-if="acceptanceCriteriaFiles.length > 0">
						<Upload u_appid="evaluation" u_fieldName="acceptanceCriteria" :u_orunid="taskInfo.id" u_type="2"
							:u_readonly="true" :u_initialAttchments="acceptanceCriteriaFiles"
							@receiveAttachmentsData="getAcceptanceCriteriaFiles"></Upload>
					</div>

					<!-- 温馨提示 -->
					<div class="u-font-bold color-red" v-if="taskInfo.enableRating == '1'">
						温馨提示：<br>
						1、验收通过后发放最低报酬，评级后发放等级差额；<br>
						2、每场活动仅有2次修改成果的机会，验收不通过将不发放报酬。<br>
					</div>

					<div class="u-font-bold color-red" v-else>
						温馨提示：<br>
						1、验收通过后发放推广报酬；<br>
						2、每场活动仅有2次修改成果的机会，验收不通过将不发放报酬。<br>
					</div>
				</div>

				<!-- 发放评级报酬，显示评级报酬信息 -->
				<div v-if="taskInfo.enableRating == '1'">
					<div class="rule-title" style="font-size: 34rpx;">
						本次活动将在{{taskInfo.ratingTime}}进行评级
					</div>

					<div class="rule-title">
						--A级--
					</div>
					<div class="u-pb-10">
						报酬：{{levelANotes}}
					</div>
					<div class="u-pb-10">
						名额：{{taskInfo.levelAQuota}}
					</div>
					<div class="u-pb-10">
						评级标准：<u-parse :html="this.escape2Html2(taskInfo.levelARatingCriteria)"></u-parse>
					</div>

					<div class="rule-title">
						--B级--
					</div>
					<div class="u-pb-10">
						报酬：{{levelBNotes}}
					</div>
					<div class="u-pb-10">
						名额：{{taskInfo.levelBQuota}}
					</div>
					<div class="u-pb-10">
						评级标准：<u-parse :html="this.escape2Html2(taskInfo.levelBRatingCriteria)"></u-parse>
					</div>

					<div class="rule-title">
						--C级--
					</div>
					<div class="u-pb-10">
						报酬：{{levelCNotes}}
					</div>
					<div class="u-pb-10">
						名额：{{taskInfo.levelCQuota}}
					</div>
					<div class="u-pb-10">
						评级标准：<u-parse :html="this.escape2Html2(taskInfo.levelCRatingCriteria)"></u-parse>
					</div>

				</div>

			</div>
		</section>

		<p class="v-sperate"></p>
		<section class="j-block width93">
			<div id="qualityreport"></div>
			<div style="margin: 10rpx 0rpx;">
				<span class="goods-details-title">商品详情</span>
			</div>
			<div class="u-mb-10">
				<u-read-more ref="uReadMore" color="#eb5468">
					<u-parse :html="this.escape2Html(goods.detail)" @load="parseLoaded"></u-parse>
				</u-read-more>
			</div>
			<!-- <div class="modal-item" @click="viewNotice">
				<div>
					购买须知
				</div>
				<div style="font-size: smaller;">
					<u-icon name="arrow-right" color="#9f9d9e" size="24"></u-icon>
				</div>
			</div>
			<div class="modal-item" @click="salesService">
				<div>
					售货服务
				</div>
				<div style="font-size: smaller;">
					<u-icon name="arrow-right" color="#9f9d9e" size="24"></u-icon>
				</div>
			</div> -->
		</section>

		<div style="height: 220rpx;"></div>

		<article class="m-buybar">
			<!-- 发起人视角 -->
			<div class="btn-wrap" v-if="isCreator">
				<!-- <button class="customStyle-btn" @click="openCustomerServiceChat">
					<u-icon name="kefu-ermai" color="#000000" size="45"></u-icon>
					<span class="customStyle-btn-span">客服</span>
				</button> -->
				<button class="customStyle-btn" @click="wakeUpShare">
					<u-icon name="zhuanfa" color="#000000" size="45"></u-icon>
					<span class="customStyle-btn-span">分享</span>
				</button>

				<div class="btn-wrap">
					<div class="have-a-try" @click="endJoin" v-if="taskInfo.taskStatus == '1'">
						<div class="u-fz-15">
							结束报名
						</div>
					</div>
					<div class="have-a-try" v-else>
						<div class="u-fz-15">
							已结束报名
						</div>
					</div>
					<div class="have-a-try u-ml-5" @click="endActivity" v-if="taskInfo.taskStatus == '1' || taskInfo.taskStatus == '2'">
						<div class="u-fz-15">
							活动作废
						</div>
					</div>
					<div class="have-a-try u-ml-5" v-if="taskInfo.taskStatus == '3'">
						<div class="u-fz-15">
							活动已作废
						</div>
					</div>
					<div class="have-a-try u-ml-5" v-if="taskInfo.taskStatus == '0'">
						<div class="u-fz-15">
							活动已结束
						</div>
					</div>
					<div class="share-link tpink-btn-bgcolor u-ml-5" @click="queryProgress">
						<div class="u-fz-15">查看进度</div>
					</div>
				</div>
				<ShareBtn :docUnid="shareData.docUnid" :url="shareData.url" :route="shareData.route"
					:style="shareData.style" :type="shareData.type" :posterData="shareData.posterData"
					:btnText="shareData.btnText" @successCallBack="shareSuccessCallBack" ref="sharebtn">
				</ShareBtn>
			</div>
		
			<!-- 参与者视角 -->
			<div class="btn-wrap" v-else>
				<button class="customStyle-btn" @click="openCustomerServiceChat">
					<u-icon name="kefu-ermai" color="#000000" size="45"></u-icon>
					<span class="customStyle-btn-span">客服</span>
				</button>
				
				<div class="btn-wrap">
					<div class="have-a-try1" @click="goToDistributionGoods">
						<div class="u-fz-15">
							参与品牌合作
						</div>
					</div>
					
					<div class="register-to-receive-end u-ml-5" v-if="taskInfo.taskStatus == '0' || endTimeContent == '活动已结束'">
						<div>活动已结束</div>
					</div>
					
					<div class="register-to-receive-end u-ml-5" v-else-if="taskInfo.taskStatus == '2' || endTimeContent == '已截止报名'">
						<div>截止报名 </div>
						<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
					</div>
					
					<div class="register-to-receive-end u-ml-5" v-else-if="taskInfo.taskStatus == '3' || endTimeContent == '活动已作废'">
						<div>活动作废 </div>
						<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
					</div>
										
					<div v-else>
						<div class="register-to-receive u-ml-5" @click="goToJoin" v-if="isClick">
							<div>立即报名 </div>
							<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
						</div>
						
						<div class="register-to-receive-end u-ml-5" v-else>
							<div>立即报名 </div>
							<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
						</div>
					</div>
					
					<!-- <div class="register-to-receive-end u-ml-5" v-if="taskInfo.taskStatus == '0' || taskInfo.taskStatus == '2' || taskInfo.taskStatus == '3' || endTimeContent == '已截止报名'">
						<div>立即报名 </div>
						<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
					</div>
					<div class="register-to-receive u-ml-5" @click="goToJoin" v-else-if="isClick">
						<div>立即报名 </div>
						<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
					</div>
					
					<div class="register-to-receive-end u-ml-5" v-else>
						<div>立即报名 </div>
						<div class="u-fz-12 pl-5">(剩余{{taskInfo.remainQuota?taskInfo.remainQuota:0}}个名额)</div>
					</div> -->
					
				</div>

			</div>
		</article>
		
		<!-- 购买须知 -->
		<u-modal v-model="buyNotice_show" confirm-text="已知晓" title="购买须知" confirm-color="#eb5468">
			<div class="slot-content2">
				<div class="u-title">· 正品保障</div>
				<p>平台所有商品均从品牌方直采，全程可跟踪物流，直接送到您手中，保证品质。</p>
				<div class="u-title u-pt-5">· 缺货可能</div>
				<p>部分商品抢购的人过多，可能会出现缺货情况。如遇到缺货，我们将在第一时间联系您进行退款。</p>
				<div class="u-title u-pt-5">· 价格说明</div>
				<p>1、商品详情页划线价指商品市场指导价；</p>
				<p>2、玫丽专享价仅对平台用户开放，最终以订单结算页价格为准；</p>
				<p>3、活动结束时累计销量达到指定要求，参与者将共同获得由品牌方给出的销售业绩奖励，具体以当前活动公示为准；</p>
				<p>4、最终解释权归玫丽——最佳拍档之女性工作平台。</p>
			</div>
		</u-modal>

		<!-- 玫丽售后服务 -->
		<u-modal v-model="afterSales_show" confirm-text="已知晓" title="售后服务" confirm-color="#eb5468">
			<div class="slot-content2">
				<div class="u-title">· 订单修改与取消</div>
				<p>订单支付成功后会立即传送给品牌方进行确认并备货，可尝试联系平台客服进行信息修改或取消。</p>
				<div class="u-title u-pt-5">· 物流说明</div>
				<p>一般情况下48小时内安排发货，物流信息会因时差、公休日等出现更新延迟。</p>
				<div class="u-title u-pt-5">· 退货说明</div>
				<p>商品（不支持7天无理由退换货商品除外）签收7日内可享受退货服务。</p>
				<div class="u-title u-pt-5">· 退货商品条件</div>
				<p>1、商品必须为平台售出；</p>
				<p>2、申请退货须在商品签收7日内提出，并在申请退货后3日内寄出，超期可能导致无法处理退货；</p>
				<p>3、退货商品必须未经穿着、洗涤、使用、污损（商品自身质量问题除外）等，吊牌未经拆除，商品配件及包装齐全且不影响二次销售；</p>
				<p>4、退货需先联系在线客服，直接寄回未经申请的退货商品可能导致丢件无法处理。</p>
			</div>
		</u-modal>

		<!-- 报名成功消息提示 -->
		<u-modal v-model="success_show" confirm-text="确定" confirm-color="#eb5468" :content="successContent"
			@confirm="goToWorkToDo">
		</u-modal>

		<!-- 是否确定作废 -->
		<u-modal v-model="endActivity_show" :mask-close-able="true" confirm-text="确认" show-cancel-button
			content="确定作废吗？" @confirm="endActivityConfirm" confirm-color="#eb5468">
		</u-modal>
		
		<!-- 是否确定结束报名 -->
		<u-modal v-model="endJoin_show" :mask-close-able="true" confirm-text="确认" show-cancel-button
			content="确定结束报名吗？" @confirm="endJoinConfirm" confirm-color="#eb5468">
		</u-modal>

		<!-- 弹窗【测评师资料尚未完整】 -->
		<u-modal ref="uModal" title="平台提示" v-model="checkEvaluatorInfo_show" show-cancel-button confirm-text="确认"
			cancel-text="取消" @confirm="goToEvaluatorInfo" confirm-color="#eb5468">
			<div class="u-p-20">
				<p>测评师资料尚未填写完毕，不可报名，是否前往填写！</p>
			</div>
		</u-modal>

		<!-- 弹窗【未注册区域服务商】 -->
		<u-modal ref="uModal" title="本次活动仅对区域服务商开放" v-model="checkRegisterProvider_show" :mask-close-able="true"
			confirm-text="前往申请" @confirm="goToRegisterProvider" confirm-color="#eb5468">
			<div class="u-p-20">
				<p>您暂不具备参与品牌推广活动的资格，欢迎了解「区域服务商」申请与权益说明，提交申请即可参与～</p>
			</div>
		</u-modal>

		<!-- 弹窗【填写收货地址】 -->
		<u-modal ref="uModal" v-model="address_show" show-cancel-button cancel-text="取消" @cancel="cancelSelectAdress"
			confirm-text="前往填写" @confirm="goToAdress" confirm-color="#eb5468">
			<div class="u-p-20">
				<p>此品牌推广活动要求提交收货地址 是否前往填写？</p>
			</div>
		</u-modal>

	</div>
</template>

<script>
	import globalData from "@/globalData";
	import shareMixins from '@/mixins/share';
	export default {
		mixins: [shareMixins],
		data() {
			return {
				docUnid: '', // 测评任务id
				taskInfo: {}, // 测评任务详情
				goods: {}, // 商品信息
				userInfo: {}, // 用户信息
				isClick: true,
				isCreator: false, // 是否为发起人
				endActivity_show: false, // 活动作废
				endJoin_show: false, // 结束报名
				evaluationResultsList: [], // 测评成果
				buyNotice_show: false, // 购买须知
				afterSales_show: false, // 玫丽售后服务
				checkEvaluatorInfo_show: false,
				checkRegisterProvider_show: false,
				shareData: {
					docUnid: '',
					url: '',
					route: '',
					style: 9,
					type: 2,
					btnText: '活动海报',
					posterData: {
						imageURL: '', // 商品主图URL地址
						productName: '', // 商品名称
						productPrice: '', // 测评报酬。如：50-100测评报酬
						invitemsg: '邀请您参与活动', // 邀请内容。可不传，默认邀请
						type: 'yphd'
					},
					imageUrl: '',
					shareTitle: ''
				},
				Navbar: {
					title: '品牌推广活动',
					background: {
						backgroundColor: '#f3e4e9',
					}
				},
				show_rule: true,
				iconName: 'arrow-down',
				endTimeContent: '', // 倒计时内容
				taskRequirementsFiles: [], // 推广任务图片
				acceptanceCriteriaFiles: [], // 验收标准图片
				price: '', // 测评报酬
				gradeRewardNotes: '', // 等级报酬说明
				success_show: false, // 报名成功弹窗
				successContent: '', // 报名成功提示内容
				address_show: false, // 填写地址弹窗
				imagesList: [],
				couponTag: '',
				couponText: '',
				levelANotes: '',
				levelBNotes: '',
				levelCNotes: '',
			};
		},

		onLoad(options) {

			if (this.isNotNull(options.isCreator)) {
				this.isCreator = options.isCreator;
			}

			this.userInfo = uni.getStorageSync('userInfo');
			if (this.isNotNull(options.docUnid)) {
				this.docUnid = options.docUnid;
				this.getActivityDetails(options.docUnid);
			} else {
				this.showMSG('error', '出错啦！')
				setTimeout(() => {
					this.goBack()
				}, 2500)
			}
		},

		onShow() {
			if (this.isNotNull(this.docUnid)) {
				this.userInfo = uni.getStorageSync('userInfo');
				this.getActivityDetails(this.docUnid);
			}
		},

		methods: {

			/** 
			 * 通过ref 重新初始化read-more组件的高度
			 */
			parseLoaded() {
				this.$refs.uReadMore.init();
			},

			/**
			 * 获取测评任务详情
			 * @param {Object} docUnid
			 */
			async getActivityDetails(docUnid) {
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/evaluation/task/info/" + docUnid,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.taskInfo = result.data; // 活动详情
					
					this.getGoodsDetails(this.taskInfo.goodsNo); // 获取商品详情
					// this.getEvaluation(this.taskInfo.goodsNo); // 获取测评成果

					if (this.imagesList.length == 0) {
						// 活动主图（发起人上传的）
						if (this.isNotNull(this.taskInfo.mainPicture)) {
							let arr1 = this.taskInfo.mainPicture.split(',');
							arr1.forEach((item, index1) => {
								this.imagesList.push(item);
							});
						}

						// 商品图
						if (this.isNotNull(this.taskInfo.goodsImages)) {
							let arr2 = this.taskInfo.goodsImages.split(',');
							arr2.forEach((item, index) => {
								this.imagesList.push(item);
							});
						}
					}

					if (!this.isCreator) {
						// 发起人等于当前用户，则表示为发起人视角
						if (this.taskInfo.initiatorId == this.userInfo.userId) {
							this.isCreator = true;
						}
					}

					if (this.taskInfo.taskStatus == '0') {
						this.endTimeContent = '活动已结束';
						
					} else if (this.taskInfo.taskStatus == '2') {
						this.endTimeContent = '已截止报名';
						
					} else if (this.taskInfo.taskStatus == '3') {
						this.endTimeContent = '活动已作废';
						
					} else {
						// 报名截止时间倒计时
						this.countdowm(this.taskInfo.joinEndTime + ' 23:59:59', '已截止报名');
					}

					// 计算测评报酬
					let minPrice = parseFloat(this.taskInfo.levelAReward);
					let maxPrice = parseFloat(this.taskInfo.levelAReward);

					// 是否评级发放报酬。0:否；1:是；默认1
					if (this.taskInfo.enableRating == "1") {
						if (parseFloat(this.taskInfo.levelBReward) > 0) {
							minPrice = Math.min(minPrice, this.taskInfo.levelBReward);
							maxPrice = Math.max(maxPrice, this.taskInfo.levelBReward);
						}

						if (parseFloat(this.taskInfo.levelCReward) > 0) {
							minPrice = Math.min(minPrice, this.taskInfo.levelCReward);
							maxPrice = Math.max(maxPrice, this.taskInfo.levelCReward);
						}

						if (maxPrice > minPrice) {
							this.price = '&yen;' + minPrice + '~&yen;' + maxPrice;
						} else if (maxPrice == minPrice) {
							this.price = maxPrice
						}

					} else {
						this.price = parseFloat(this.taskInfo.reward);
						minPrice = parseFloat(this.taskInfo.reward);
						maxPrice = parseFloat(this.taskInfo.reward);
					}

					// 等级报酬说明
					this.levelANotes = this.getNotes(this.taskInfo.levelAReward, this.taskInfo.levelACouponAmount);
					this.levelBNotes = this.getNotes(this.taskInfo.levelBReward, this.taskInfo.levelBCouponAmount);
					this.levelCNotes = this.getNotes(this.taskInfo.levelCReward, this.taskInfo.levelCCouponAmount);

					// 等级报酬说明
					// this.gradeRewardNotes = this.getGradeRewardNotes();

					// 分享组件数据初始化--发起人视角
					let imageUrl = "";
					if (this.isNotNull(this.taskInfo.mainPicture)) {
						imageUrl = this.taskInfo.mainPicture;
					} else {
						imageUrl = this.taskInfo.goodsImages.split(",")[0];
					}
					this.shareData.docUnid = this.taskInfo.id;
					this.shareData.url = '/pages_private_scene1/evaluation/sign_up?docUnid=' + this.taskInfo.id;
					this.shareData.route = this.getCurrentPageUrl(this);
					this.shareData.posterData.imageURL = imageUrl;
					this.shareData.posterData.productName = this.taskInfo.subject;
					this.shareData.posterData.productPrice = maxPrice;
					this.shareData.imageUrl = imageUrl;
					this.shareData.shareTitle = '最高报酬¥' + maxPrice +
						'！名额' + (this.taskInfo.remainQuota ? this.taskInfo.remainQuota : 0) +
						'！' + (this.taskInfo.subject ? this.taskInfo.subject : '')

					console.log("分享组件数据初始化shareData=", this.shareData);

					this.getFiles(this.taskInfo.id, 'taskRequirements'); // 试用素材
					this.getFiles(this.taskInfo.id, "acceptanceCriteria"); // 截图凭证

					// 初始化优惠券标签
					this.initCouponTag();

				} else {
					this.$u.toast(result.msg)
				}
			},

			/**
			 * 获取等级报酬说明
			 */
			getGradeRewardNotes() {

				let notes = "";

				// A级
				if (this.isNotNull(this.taskInfo.levelAQuota) && Number(this.taskInfo.levelAQuota) > 0) {
					notes += "<p>";
					if (this.isNotNull(this.taskInfo.levelAReward) && parseFloat(this.taskInfo.levelAReward) > 0.0 && this
						.isNotNull(this.taskInfo.levelACouponAmount) && parseFloat(this.taskInfo.levelACouponAmount) > 0) {
						notes += "A级报酬 ¥ " + this.taskInfo.levelAReward + "现金和¥ " + this.taskInfo.levelACouponAmount +
							"优惠券";
					}
					if (this.isNotNull(this.taskInfo.levelAReward) && parseFloat(this.taskInfo.levelAReward) > 0.0 && (!
							this.isNotNull(this.taskInfo.levelACouponAmount) || parseFloat(this.taskInfo
								.levelACouponAmount) == 0)) {
						notes += "A级报酬 ¥ " + this.taskInfo.levelAReward + "现金";
					}
					if ((!this.isNotNull(this.taskInfo.levelAReward) || parseFloat(this.taskInfo.levelAReward) == 0.0) &&
						this.isNotNull(this.taskInfo.levelACouponAmount) && parseFloat(this.taskInfo.levelACouponAmount) >
						0) {
						notes += "A级报酬 ¥ " + this.taskInfo.levelACouponAmount + "优惠券";
					}

					notes += " 共" + this.taskInfo.levelAQuota + "名";

					notes += " </p>";
				}

				// B级
				if (this.isNotNull(this.taskInfo.levelBQuota) && Number(this.taskInfo.levelBQuota) > 0) {
					notes += "<p>";
					if (this.isNotNull(this.taskInfo.levelBReward) && parseFloat(this.taskInfo.levelBReward) > 0.0 && this
						.isNotNull(this.taskInfo.levelBCouponAmount) && parseFloat(this.taskInfo.levelBCouponAmount) > 0) {
						notes += "B级报酬 ¥ " + this.taskInfo.levelBReward + "现金和¥ " + this.taskInfo.levelBCouponAmount +
							"优惠券";
					}
					if (this.isNotNull(this.taskInfo.levelBReward) && parseFloat(this.taskInfo.levelBReward) > 0.0 && (!
							this.isNotNull(this.taskInfo.levelBCouponAmount) || parseFloat(this.taskInfo
								.levelBCouponAmount) == 0)) {
						notes += "B级报酬 ¥ " + this.taskInfo.levelBReward + "现金";
					}
					if ((!this.isNotNull(this.taskInfo.levelBReward) || parseFloat(this.taskInfo.levelBReward) == 0.0) &&
						this.isNotNull(this.taskInfo.levelBCouponAmount) && parseFloat(this.taskInfo.levelBCouponAmount) >
						0) {
						notes += "B级报酬 ¥ " + this.taskInfo.levelBCouponAmount + "优惠券";
					}

					notes += " 共" + this.taskInfo.levelBQuota + "名";

					notes += " </p>";
				}

				// C级
				if (this.isNotNull(this.taskInfo.levelCQuota) && Number(this.taskInfo.levelCQuota) > 0) {
					notes += "<p>";
					if (this.isNotNull(this.taskInfo.levelCReward) && parseFloat(this.taskInfo.levelCReward) > 0.0 && this
						.isNotNull(this.taskInfo.levelCCouponAmount) && parseFloat(this.taskInfo.levelCCouponAmount) > 0) {
						notes += "C级报酬 ¥ " + this.taskInfo.levelCReward + "现金和¥ " + this.taskInfo.levelCCouponAmount +
							"优惠券";
					}
					if (this.isNotNull(this.taskInfo.levelCReward) && parseFloat(this.taskInfo.levelCReward) > 0.0 && (!
							this.isNotNull(this.taskInfo.levelCCouponAmount) || parseFloat(this.taskInfo
								.levelCCouponAmount) == 0)) {
						notes += "C级报酬 ¥ " + this.taskInfo.levelCReward + "现金";
					}
					if ((!this.isNotNull(this.taskInfo.levelCReward) || parseFloat(this.taskInfo.levelCReward) == 0.0) &&
						this.isNotNull(this.taskInfo.levelCCouponAmount) && parseFloat(this.taskInfo.levelCCouponAmount) >
						0) {
						notes += "C级报酬 ¥ " + this.taskInfo.levelCCouponAmount + "优惠券";
					}

					notes += " 共" + this.taskInfo.levelCQuota + "名";

					notes += " </p>";
				}

				return notes;
			},

			/** 获取等级报酬说明
			 * @param {Object} reward
			 * @param {Object} couponAmount
			 */
			getNotes(reward, couponAmount) {
				if (reward > 0 && couponAmount > 0) {
					return "¥" + reward + "现金和" + Number(couponAmount) + "优惠券";
				} else if (reward > 0 && couponAmount == 0) {
					return "¥" + reward + "现金";
				} else if (reward == 0 && couponAmount > 0) {
					return Number(couponAmount) + "优惠券";
				}
			},

			/**
			 * 获取商品详情
			 * @param {Object} goodsNo
			 */
			async getGoodsDetails(goodsNo) {
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/goods/get/" + goodsNo,
				});
				if (result.code == 200) {
					this.goods = result.data; // 商品信息
				}
			},

			/**
			 * 初始化优惠券标签
			 */
			initCouponTag() {
				if (this.taskInfo.enableRating == '1') {
					// 开启评级
					let couponTag_temp = Math.max(this.taskInfo.levelACouponAmount, this.taskInfo.levelBCouponAmount, this
						.taskInfo.levelCCouponAmount)
					if (couponTag_temp > 0) {
						this.couponTag = couponTag_temp;
						this.couponText = '最高获' + couponTag_temp + '元优惠券';
					}
				} else {
					// 不开启评级
					let couponTag_temp = Math.max(this.taskInfo.couponAmount, 0); // 为了去掉.00
					if (couponTag_temp > 0) {
						this.couponTag = couponTag_temp;
						this.couponText = '最高获' + couponTag_temp + '元优惠券';
					}
				}
			},

			/**
			 * 获取测评成果
			 * @param {Object} goodsNo
			 */
			async getEvaluation(goodsNo) {
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/evaluation/task/result/" + goodsNo,
					quantity: '3',
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.evaluationResultsList = result.data;
				}
			},
			
			/**
			 * 发起人结束报名
			 * 任务状态。0:正常结束(到期自动结束)；1:正在进行中；2:报名结束；3:活动作废(手动结束)
			 */
			async endJoin() {
				// 登录验证
				var loginRes = this.checkLogin(1)
				if (!loginRes) {
					return false;
				}
				if (this.taskInfo.taskStatus == '0') {
					this.showMSG('none', '活动已结束');
				} else if(this.taskInfo.taskStatus == '2') {
					this.showMSG('none', '已截止报名');
				} else if(this.taskInfo.taskStatus == '3') {
					this.showMSG('none', '活动已作废');
				} else {
					this.endJoin_show = true;
				}
			},
			
			/**
			 * 确认结束报名
			 */
			async endJoinConfirm() {
				console.log("确认结束报名.....");
				// 状态。0:结束；1:启用
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/evaluation/task/end/join",
					id: this.taskInfo.id,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.taskInfo = result.data; // 更新任务详情
					this.endTimeContent = '已截止报名';
					this.showMSG('none', '已截止报名');
				} else {
					this.showMSG('error', '出错啦！')
				}
			},
			
			/**
			 * 发起人作废活动
			 * 任务状态。0:正常结束(到期自动结束)；1:正在进行中；2:报名结束；3:活动作废(手动结束)
			 */
			async endActivity() {
				// 登录验证
				var loginRes = this.checkLogin(1)
				if (!loginRes) {
					return false;
				}
				if (this.taskInfo.taskStatus == '0') {
					this.showMSG('none', '活动已结束');
				} else if(this.taskInfo.taskStatus == '3') {
					this.showMSG('none', '活动已作废');
				} else {
					this.endActivity_show = true;
				}
			},

			/**
			 * 确认作废
			 */
			async endActivityConfirm() {
				console.log("确认作废.....");
				// 状态。0:结束；1:启用
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/evaluation/task/finish",
					id: this.taskInfo.id,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.taskInfo = result.data; // 更新任务详情
					this.endTimeContent = '活动已作废';
					this.showMSG('none', '已作废');
				} else {
					this.showMSG('error', '出错啦！')
				}
			},

			/**
			 * 跳转到商品销售页面
			 */
			async goToDistributionGoods() {
				// 登录验证
				var loginRes = this.checkLogin(1)
				if (!loginRes) {
					return false;
				}
				this.$u.route('/pages_private_scene2/GroupPurchase/DistributionGoods?goodsNo=' + this.taskInfo
					.goodsNo + '&goodsId=' + this.taskInfo.goodsId);
			},

			/**
			 * 立即报名
			 */
			async goToJoin() {
				// 登录验证
				var loginRes = this.checkLogin(1)
				if (!loginRes) {
					return false;
				}
				if (this.taskInfo.taskStatus == '0') {
					this.showMSG('none', '活动已结束');
					return;
				} else if (this.taskInfo.taskStatus == '2') {
					this.showMSG('none', '已截止报名');
					return;
				} else if (this.taskInfo.taskStatus == '3') {
					this.showMSG('none', '活动已作废');
					return;
				} else if (this.taskInfo.initiatorId == this.userInfo.userId) {
					this.$u.toast("不可参与自己发起的推广活动！");
					return;
				} else {
					// 判断是否可以报名
					this.verifyRegistration();
				}
			},

			/**
			 * 判断是否可以报名
			 */
			async verifyRegistration() {

				// 设置不可点击
				this.isClick = false;
				this.showLoading();

				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/evaluation/signup/verify",
					partnerId: this.userInfo.userId, // 参与者id
					partnerName: this.userInfo.nickName, // 参与者昵称
					partnerAvatarUrl: this.userInfo.avatarUrl, // 参与者头像
					initiatorId: this.taskInfo.initiatorId,
					mainId: this.taskInfo.id,
					loading: true, // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) { // 可以报名
					// 判断是否需要提交收货信息。0:否；1:是；
					if (this.taskInfo.submitConsigneeInfo == '1') {
						// 否则，则 弹窗提示 选择收货地址
						this.address_show = true;
					} else {
						// 提交报名
						this.signup();
					}
				} else if (result.code == 203) { // 已报名
					setTimeout(() => {
						this.isClick = true;
						this.$u.route(result.url)
					}, 1000);
				} else if (result.code == 205) { // 测评师资料尚未填写完毕
					this.hideLoading();
					this.isClick = true;
					this.checkEvaluatorInfo_show = true;

				} else if (result.code == 207) { // 未注册“区域服务商”
					this.hideLoading();
					this.isClick = true;
					this.checkRegisterProvider_show = true;

				} else if (result.code == 208) { // 有未提交反馈的记录
					let result2 = await this.$u.api.unifyMiniRestGet({
						systemid: "meily",
						url: "/evaluation/signup/getNotSubmit/" + this.userInfo.userId, // 参与者id
						loading: true, // 默认发起请求会有一个全局的Loading，设置false可去掉
					});
					if (result2.code == 200 && this.isNotNull(result2.data)) {
						this.$u.toast(result.msg);
						setTimeout(() => {
							this.showMSG('loading', '正在跳转···');
							setTimeout(() => {
								this.$u.route(
									'/pages_private_scene1/evaluation/submit_results?recordId=' +
									result2.data[0].id);
							}, 1500)
						}, 1500)
					}
				} else {
					// 其他情况
					this.$u.toast(result.msg);
					this.isClick = true;
				}
			},

			/**
			 * 前往选择收货地址
			 */
			goToAdress() {
				let signupInfo = {
					"partnerId": this.userInfo.userId, // 参与者id
					"partnerName": this.userInfo.nickName, // 参与者昵称
					"partnerAvatarUrl": this.userInfo.avatarUrl, // 参与者头像
					"mainId": this.taskInfo.id,
					"orderStatus": '待提交',
					"submitLimitDays": this.taskInfo.submitLimitDays
				}
				this.isClick = true;
				this.$u.route('/pages_private_scene1/evaluation/write_address?signupInfo=' + encodeURIComponent(JSON
					.stringify(signupInfo)));
			},

			/**
			 * 取消选择收货地址
			 */
			cancelSelectAdress() {
				this.isClick = true;
			},

			/**
			 * 报名
			 */
			async signup() {
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/evaluation/signup/join",
					partnerId: this.userInfo.userId, // 参与者id
					partnerName: this.userInfo.nickName, // 参与者昵称
					partnerAvatarUrl: this.userInfo.avatarUrl, // 参与者头像
					mainId: this.taskInfo.id,
					status: '待提交',
					loading: true, // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.hideLoading();
					this.success_show = true;
					this.successContent = '报名成功，请于' + this.taskInfo.submitLimitDays + '天内提交成果，逾期作废';
				} else {
					this.isClick = true;
					this.$u.toast(result.msg);
				}
			},

			/**
			 * 跳转到【工作待办】
			 */
			goToWorkToDo() {
				this.$u.route('/pages_tabbar_contact/personal_contact/WorkToDo?backto=personalIndex');
			},

			/**
			 * 前往测评师资料填写页面
			 */
			goToEvaluatorInfo() {
				this.$u.route(
					'/pages_tabbar_contact/personal_contact/CustomerInfo?regionalProvider_show=0&frombusiness=1');
			},

			/**
			 * 前往区域服务商注册页面
			 */
			goToRegisterProvider() {
				this.$u.route('/pages_tabbar_contact/personal_contact/VPSRegister');
			},

			/**
			 * 查看进度--跳转到报名记录列表页面
			 */
			async queryProgress() {

				// 登录验证
				var loginRes = this.checkLogin(1)
				if (!loginRes) {
					return false;
				}
				this.$u.route('/pages_private_scene1/evaluation/join_details?docUnid=' + this.taskInfo.id);
			},

			/**
			 * 查看全部测评成果
			 */
			viewAllEvaluation() {
				this.$u.route('/pages_private_scene2/GroupPurchase/AllEvaluationResults?goodsNo=' + this.taskInfo.goodsNo);
			},

			/**
			 * 【重要！报名前请仔细阅读】 
			 */
			showRules() {
				if (this.show_rule) {
					this.iconName = 'arrow-right'
					this.show_rule = false
				} else {
					this.iconName = 'arrow-down'
					this.show_rule = true
				}
			},

			/**
			 * 购买须知
			 */
			viewNotice() {
				this.buyNotice_show = true
			},

			/**
			 * 售后服务
			 */
			salesService() {
				this.afterSales_show = true
			},

			/**
			 * 点击联系客服
			 */
			async openCustomerServiceChat() {
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/qyapi/kf/account/url/".concat(globalData.openKfid_evaluation),
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					const pages = getCurrentPages(); // 获取栈实例
					//当前页面路径(带参数)
					let currentPage = pages[pages.length - 1]['$page']['fullPath']
					let kfUrl = result.data
					wx.openCustomerServiceChat({
						extInfo: {
							url: kfUrl
						},
						corpId: globalData.corpId,
						showMessageCard: true,
						sendMessagePath: currentPage,
						success(res) {
							console.log(res)
						}
					})
				} else {
					this.showMSG('error', '出错啦！');
				}
			},


			/** 
			 * 唤起分享弹窗
			 */
			wakeUpShare() {
				this.$refs.sharebtn.wakeUpPop()
			},

			/**
			 * 分享回调函数
			 */
			async shareSuccessCallBack(obj) {
				/* console.log("**************************");
				console.log("开始执行，分享回调函数...");
				console.log("obj=", obj);
				// 保存分享次数
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/behavior/statistics/update",
					createUser: userInfo.userId,
					createUserName: userInfo.nickName,
					createUserAvatar: userInfo.avatarUrl,
					behaviorId: this.taskInfo.goodsId,
					behaviorName: this.taskInfo.goodsName,
					behaviorType: '1',// 分享
					sourceId: obj.NewId,// 分享记录唯一id
					sourceType: '3',// 测评
					remark: '',
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				console.log(result);
				console.log("分享回调函数，执行结束！");
				console.log("**************************"); */
			},

			/**
			 * 接收上传组件传过来的值并更新附件列表数据
			 * 获取附件列表（推广任务图片）
			 */
			async getTaskRequirementsFiles(res) {
				this.taskRequirementsFiles = res;
			},

			/**
			 * 接收上传组件传过来的值并更新附件列表数据
			 * 获取附件列表（验收标准图片）
			 */
			async getAcceptanceCriteriaFiles(res) {
				this.acceptanceCriteriaFiles = res;
			},

			/**
			 * 初始化附件列表
			 * @param {Object} orunid 实例id
			 */
			async getFiles(orunid, fieldName) {
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyRequest({
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					appid: 'FILE',
					wf_num: 'R_FILE_BL002',
					orunid: orunid,
					fieldName: fieldName,
					loading: false // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					// 推广任务要求
					if (fieldName == 'taskRequirements') {
						this.taskRequirementsFiles = result.data
					}
					// 验收标准
					if (fieldName == "acceptanceCriteria") {
						this.acceptanceCriteriaFiles = result.data
					}
				}
			},

			/**
			 * 点击查看原图
			 */
			showOriginalImage(index) {
				let graphicUrlList = this.taskInfo.goodsImages.split(',')
				wx.previewImage({
					current: graphicUrlList[index],
					urls: graphicUrlList,
				});
			},

			showLoading() {
				wx.showLoading({
					title: '提交中...',
					icon: 'none',
				});
			},

			hideLoading() {
				wx.hideLoading();
			},

		},
	};
</script>

<style scoped>
	.n-price {
		height: 50px;
		width: 93%;
		margin: 0 auto;
		color: #000000;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
	}

	.n-price__left {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		line-height: 110rpx;
	}

	.n-price .curprice {
		font-size: 15px;
		color: #e31436;
	}

	.n-price .curprice .curnum {
		font-size: 44rpx;
		font-weight: bold;
	}

	.n-price .mrkprice {
		text-decoration: line-through;
		margin-left: 5rpx;
		font-size: 30rpx;
		color: #999;
	}

	.n-price .tag {
		display: inline-block;
		padding: 0 5px;
		height: 15px;
		line-height: 15px;
		text-align: center;
		margin-left: 10px;
		vertical-align: 2px;
		font-size: 11px;
		color: #fff;
		background: #ff8587;
		border-radius: 3px;
	}

	.n-prdinfo {
		margin: 0 10px 10px;
		border-top: 1px solid #f0f0f0;
	}

	.n-prdinfo .tit {
		line-height: 32rpx;
		/* padding-top: 10px; */
		margin-bottom: 12rpx;
		width: 100%;
		font-size: 30rpx;
		color: #333;
		font-weight: bold;
	}

	.n-prdinfo .subtit {
		font-size: 13px;
		color: #333;
		line-height: 21px;
	}

	.n-prdinfo .subtit .spec {
		color: #e31436;
	}

	.n-prdinfo .presaletxt {
		color: #f00;
	}

	.u-graybar {
		background: #f1f1f1;
		height: 10px;
	}

	.n-activitybox {
		background-color: #FFFFFF;
		width: 90%;
		margin: 0 auto;
	}

	.n-activitybox .itm {
		position: relative;
		padding: 9px 0;
		/* border-bottom: 1px solid #f0f0f0; */
		zoom: 1;
	}

	.n-activitybox .itm:after {
		display: block;
		clear: both;
		visibility: hidden;
		height: 0;
		overflow: hidden;
		content: ".";
	}

	.n-activitybox .itm .name {
		float: left;
		height: 24px;
		line-height: 24px;
		font-size: 13px;
		color: #6f6e6e;
	}

	.n-activitybox .itm .cnt {
		margin-left: 50px;
		padding-top: 1px;
		padding-right: 10px;
	}

	.n-activitybox .itm:last-child {
		border-bottom: none;
	}

	.n-activitybox .v-linkicon {
		position: absolute;
		top: 0;
		bottom: 0;
		right: 0px;
		width: 10px;
		height: 10px;
		margin-top: auto;
		margin-bottom: auto;
		background-size: 200px;
	}


	.mrkprice {
		padding-left: 8rpx;
	}

	.v-sperate {
		height: 10rpx;
		background: #f7f1f7;
	}

	.n-goodsdetailbar {
		position: relative;
		height: 44px;
	}

	.n-goodsdetailbar .txt {
		position: absolute;
		top: 0;
		left: 0px;
		z-index: 9;
		width: 100%;
		height: 44px;
		line-height: 44px;
		text-align: center;
		font-size: 30rpx;
		font-weight: bold;
	}

	.n-goodsdetailbar .v-img {
		display: block;
		position: absolute;
		top: 0px;
		left: 0px;
		width: 100%;
		height: 90rpx;
	}

	img {
		vertical-align: middle;
		border: 0;
	}

	.m-buybar {
		/* position: fixed;
		z-index: 999;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 200rpx;
		background: #fff; */
		position: fixed;
		z-index: 1;
		bottom: 0;
		left: 0;
		width: 100%;
		background: #fff;
		padding-top: 15rpx;
		padding-bottom: 50rpx;
	}

	.m-buybar .btn-wrap {
		width: 95%;
		margin: 0 auto;
		height: 100%;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		-ms-flex-align: center;
		align-items: center;
	}

	.m-buybar a {
		display: block;
		height: 50px;
		vertical-align: top;
		font-size: 15px;
		line-height: 50px;
		text-align: center;
	}

	.m-buybar .btn {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		-ms-flex: 1;
		flex: 1;
	}

	.m-buybar .buynow {
		color: #fff;
		background: #e31436;
	}

	.m-buybar .buynow.btn-large {
		border: none;
		background-color: #d22147;
		color: #fff;
	}

	.m-buybar .buynow.dis {
		color: #fff;
		background-color: #ccc;
		border: none;
		cursor: default;
	}

	.m-buybar .buynow.s-fc {
		background: #000;
	}

	.m-buybar .addcart {
		background-color: #ff8587;
		color: #fff;
	}

	.m-buybar .addcart.dis {
		color: #fff;
		background-color: #ccc;
		border: none;
		cursor: default;
	}

	.m-buybar .collect {
		position: relative;
		/* width: 95px; */
		/* width: 140rpx; */
		/* padding-top: 12px; */
		/* border-top: 1px solid #ddd; */
		/* border-right: 1px solid #ddd; */
		color: #666;
		font-size: 24rpx;
	}

	.m-buybar .collect:after {
		content: "";
		position: absolute;
		width: 20px;
		height: 20px;
		top: 7px;
		left: 17px;
		background-size: 200px;
	}

	.m-buybar .collect-1 {
		background-position: -161px 1px;
	}

	.m-buybar .collect-1:after {
		background-position: -139px -33px;
	}

	.m-buybar .cart {
		position: relative;
		width: 55px;
		/* padding-top: 12px; */
		/* border-top: 1px solid #ddd; */
		color: #666;
		font-size: 12px;
		background-size: 200px;
	}

	.m-buybar .cart .count {
		position: absolute;
		min-width: 16px;
		height: 16px;
		left: 27px;
		top: 2px;
		background-color: #fff;
		color: #e31436;
		-webkit-border-radius: 8px;
		border-radius: 8px;
		font-size: 12px;
		line-height: 14px;
		text-align: center;
		padding: 0 4px;
		border: 1px solid #e31436;
	}

	.m-buybar .nogoods {
		position: absolute;
		top: -40px;
		left: 0;
		width: 100%;
		padding-left: 10px;
		background-color: rgba(0, 0, 0, 0.7);
		text-align: left;
		font-size: 16px;
		line-height: 40px;
		color: #fff;
	}

	.m-buybar .nogoods:after {
		content: "";
		position: absolute;
		width: 70px;
		height: 45px;
		left: 10px;
		top: -35px;
		background-size: 200px;
	}

	.m-buybar .cantdeliver {
		position: absolute;
		text-align: center;
		top: -40px;
		left: 0;
		width: 100%;
		background-color: rgba(0, 0, 0, 0.8);
		font-size: 12px;
		line-height: 40px;
		color: #fff;
	}

	.m-buybar .hide {
		display: none;
	}

	.bg-white {
		background-color: #FFFFFF;
	}

	.itm-value {
		font-weight: 500;
	}

	.f-els-1 {
		line-height: 48rpx;
	}

	.recovery {
		color: #fff;
		background: #eab315;
	}

	.view-pro {
		color: #fff;
		background: #3b79fe;
	}

	.slot-content {
		font-size: 28rpx;
		color: #bcbcbc;
		text-align: center;
		margin: 0 auto;
	}

	.infoblocks {
		background-color: #FFFFFF;
	}

	.remark-box {
		/* width: 95%; */
		margin: 0 auto;
	}

	.remark-rule {
		margin: 0rpx 40rpx 0rpx 40rpx;
	}

	.remark-rule-title {
		color: #6f6e6e;
		height: 24px;
		line-height: 24px;
		font-size: 13px;
	}

	.line-through {
		font-size: 32rpx;
		color: #919191;
		padding: 0 0.2rem;
		text-decoration: line-through;
	}

	.price-area {
		color: red;
		display: flex;
	}

	.commodity-name {
		width: 93%;
		margin: 0 auto;
		color: #000000;
	}

	.work-free {
		width: 93%;
		margin: 0 auto;
		background-color: #fef9e6;
		color: #000000;
		padding: 20rpx;
	}

	.work-free .text1 {
		color: #3e3d3d;
	}

	.work-free .text2 {
		color: #7d7d7d;
	}

	.work-free .text2 span {
		color: red;
	}

	.notice-area {
		color: #7d7d7d;
		width: 93%;
		margin: 0 auto;
	}

	.aui-flex-goods {
		margin-right: .8em;
		width: 80px;
		height: 80px;
		line-height: 80px;
		text-align: center;
		float: left;
		display: inline;
	}

	.aui-flex-goods img {
		width: 100%;
		max-height: 100%;
		vertical-align: top;
	}

	.aui-flex-content {
		display: inline;
		width: 80px;
		height: 80px;
	}

	.aui-flex-title {
		font-weight: bold;
		color: #1d1b1b;
		font-size: 30rpx;
		padding-bottom: 10rpx;
	}

	.aui-flex-time {
		font-size: 24rpx;
		color: #bcbcbc;
		padding-top: 15rpx;
	}

	.solitaire-box {
		width: 95%;
		margin: 0 auto;
	}

	.certificate {
		/* border-top: 1px solid rgba(0, 0, 0, .08);
		margin-top: -6rpx; */
		/* padding: 0 32rpx 0; */
	}

	.certificateItemMain {
		border-radius: 20rpx;
		overflow: hidden;
		/* padding: 0 32rpx; */
	}

	.certificateItem {
		align-items: center;
		/* border-bottom: 1px solid rgba(0, 0, 0, .08); */
		display: block;
		flex-direction: row;
		justify-content: space-between;
		padding: 25rpx 0;
	}

	.messageItem .messageTop {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
	}

	.messageTop .imgbox {
		border-radius: 10rpx;
		height: 72rpx;
		overflow: hidden;
		width: 72rpx;
		margin-right: 8px;
	}

	.messageItem .messageTop .imgbox ._img {
		display: block;
		height: 72rpx;
		width: 72rpx;
	}

	.messageItem .messageTop .name {
		color: #000;
		font-size: 28rpx;
		line-height: 1.2;
		overflow: hidden;
		padding-left: 0rpx;
		text-overflow: ellipsis;
		white-space: nowrap;
		width: 100%;
	}

	.messageItem .messageTop .name .text1 .quantity_text {
		font-weight: 400;
	}

	.messageItem .messageTop .quantity {
		color: #000;
		font-size: 28rpx;
		line-height: 2.2;
		white-space: nowrap;
	}

	.messageItem .messageTop .quantity .quantity_text {
		color: red;
		font-size: 28rpx;
		font-weight: 400;
	}

	.quantity {
		padding-right: 20rpx;
	}

	.messageItem .messageTop .name .text1 {
		color: rgba(0, 0, 0, .5);
		font-size: 24rpx;
		font-weight: 400;
	}

	.messageItem .messageTop .name .text2 {
		color: rgba(0, 0, 0, .5);
		font-size: 28rpx;
		font-weight: 400;
		margin-top: 10rpx;
	}

	.messageItem .messageCenter {
		color: rgba(0, 0, 0, .8);
		font-size: 28rpx;
		margin-top: 32rpx;
	}

	.messageItem .messageBottom {
		padding: 32rpx 0;
	}


	.discount-price {
		/* line-height: 100rpx; */
		font-weight: bold;
		font-size: 48rpx;
	}

	.font-thin {
		font-weight: 400;
	}

	.deliver-goods {
		margin: 30rpx;
		line-height: 40rpx;
		display: flex;
		justify-content: space-between;
	}

	.deliver-goods .left {
		width: 480rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.specs-goods {
		margin: 30rpx;
		line-height: 40rpx;
		display: flex;
		justify-content: space-between;
	}

	.specs-goods .left {
		width: auto;
	}

	.specs-goods .right {
		width: 90%;
		word-break: normal;
		display: block;
		white-space: pre-wrap;
		overflow: hidden;
	}

	.color-gray {
		color: #9f9d9e;
	}

	.width93 {
		width: 93%;
		margin: 0 auto;
	}

	.evaluation-show-title {
		margin: 10rpx 0rpx;
		display: flex;
		justify-content: space-between;
	}

	.evaluation-show-title .left {
		margin: 20rpx 0rpx;
		font-weight: bolder;
		font-size: 40rpx;
	}

	.evaluation-show-title .right {
		height: 100rpx;
		line-height: 100rpx;
		/* font-size: 30rpx; */
		color: #9f9d9e;
	}

	.goods-details-title {
		margin: 20rpx 0;
		font-weight: bolder;
		font-size: 40rpx;
		height: 100rpx;
		line-height: 100rpx;
	}

	.follow-group {
		margin: 30rpx;
		line-height: 40rpx;
		display: flex;
		justify-content: space-between;
	}

	.modal-item {
		/* margin: 40rpx 0rpx; */
		height: 100rpx;
		line-height: 40rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		/* color: #9f9d9e; */
		border-top: 1rpx solid #eeeded;
	}

	/* 商品列表 */
	.aui-list-box {
		overflow: hidden;
		position: relative;
	}

	.aui-list-item {
		width: 48%;
		float: left;
		margin: 0 1% 2% 1%;
		background: #fff;
		display: block;
		overflow: hidden;
		border-radius: 10rpx;
		background-color: #ffffff;
	}

	.aui-list-theme-img {
		height: auto;
		width: 100%;
		position: relative;
	}

	.aui-list-theme-img img {
		width: 100%;
		height: auto;
		display: block;
		border: none;
	}

	/* 两行或多行显示... */
	.line-ellipsis {
		width: 320rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		-webkit-box-orient: vertical;
	}

	.aui-list-theme-message {
		background: #ffffff;
		padding: 10rpx 10rpx;
	}

	.aui-list-theme-title {
		color: #4a4a4a;
		font-size: 32rpx;
		line-height: 38rpx;
		margin-top: 5rpx;
	}

	.aui-list-theme-message p {
		font-size: 24rpx;
		font-weight: bold;
	}

	.aui-list-theme-message span.line-through {
		font-size: 0.7rem;
		color: #919191;
		padding: 0 0.2rem;
		text-decoration: line-through;
	}

	.aui-list-theme-message span.none-line-through {
		font-size: 0.7rem;
		color: #919191;
		padding: 0 0.2rem;
	}

	.aui-list-theme-message p i {
		font-style: normal;
		font-size: 0.7rem;
		padding: 0 0.2rem;
		color: #ff3b52;
		float: right;
		width: 25px;
		height: 25px;
	}

	.aui-list-theme-message p em {
		font-style: normal;
		font-size: 0.7rem;
		color: #ff3b52;
		text-decoration: line-through;
		font-weight: normal;
	}

	.pictrues-box {
		display: flex;
		flex-wrap: wrap;
		/* padding-bottom: 40rpx; */
	}

	.customStyle-btn {
		width: 50rpx;
		height: 90rpx;
		border: none !important;
		background-color: transparent;
		margin-left: 0;
		margin-right: 15rpx;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		-webkit-box-pack: center;
		-webkit-justify-content: center;
		justify-content: center;
		padding-left: 0rpx !important;
		padding-right: 0rpx !important;
		padding-top: 6rpx !important;
	}

	.customStyle-btn::after {
		border: none;
	}

	.customStyle-btn-span {
		font-size: 20rpx;
		color: #000000;
		/* color: #666; */
		line-height: 45rpx;
	}

	.slot-content2 {
		font-size: 28rpx;
		/* color: #bcbcbc; */
		text-align: left;
		width: 93%;
		margin: 0 auto;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
	}

	.slot-content3 {
		font-size: 32rpx;
		/* color: #bcbcbc; */
		text-align: left;
		width: 93%;
		margin: 0 auto;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
	}

	.slot-content4 {
		font-size: 30rpx;
		text-align: left;
		width: 85%;
		margin: 0 auto;
		padding-top: 60rpx;
		padding-bottom: 40rpx;
	}

	.have-a-try {
		/* font-size: 30rpx;
		width: 290rpx;
		height: 86rpx;
		border: 2rpx solid #9f9d9e;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center; */
		width: 190rpx;
		height: 86rpx;
		border: 2rpx solid #c5c3c4;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.have-a-try .price {
		line-height: 36rpx;
		color: #000000;
		font-weight: bold;
	}

	.have-a-try1 {
		/* width: 400rpx;
		height: 86rpx;
		border: 2rpx solid #9f9d9e;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center; */
		font-size: 30rpx;
		width: 280rpx;
		height: 86rpx;
		border: 2rpx solid #9f9d9e;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.have-a-try1 .price {
		line-height: 36rpx;
		color: #000000;
		font-weight: bold;
	}

	.color-red {
		color: #eb5468;
	}

	.pl-3 {
		padding-left: 3rpx;
	}

	.pl-5 {
		padding-left: 5rpx;
	}

	.share-link {
		width: 250rpx;
		height: 86rpx;
		/* border: 2rpx solid #9f9d9e; */
		border-radius: 10rpx;
		background-color: #eb5468;
		color: #ffffff;
		font-weight: 200;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.share-link .price {
		line-height: 36rpx;
		font-weight: bold;
		padding-left: 3rpx;
	}

	.collect-samples {
		width: 340rpx;
		height: 86rpx;
		border: 2rpx solid #9f9d9e;
		border-radius: 10rpx;
		background-color: #eb5468;
		color: #ffffff;
		font-weight: 200;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.collect-samples .price {
		line-height: 36rpx;
		/* font-weight: bold; */
		/* padding-left: 3rpx; */
	}

	.red-area {
		height: 120rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-image: linear-gradient(to right, #fc4f48, #fe6a44);
	}

	.red-area .tips {
		color: #ffffff;
		font-size: 22rpx;
	}

	.red-area .price {
		color: #ffffff;
		font-size: 50rpx;
		font-weight: bold;
		line-height: 60rpx;
	}

	.customStyle-share {
		height: 90rpx;
		border: none !important;
		background-color: transparent;
		float: left;
		margin-right: 1rpx;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		-webkit-box-pack: center;
		-webkit-justify-content: center;
		justify-content: center;
		width: 80rpx !important;
		padding-left: 0rpx !important;
		padding-right: 0rpx !important;
		padding-top: 6rpx !important;
	}

	.customStyle-share::after {
		border: none;
	}

	.customStyle-share-span {
		font-size: 12px;
		color: #666;
		line-height: 45rpx;
	}

	.rule-title {
		height: 100rpx;
		line-height: 100rpx;
		/* width: 90%;
		margin: 0 auto; */
		font-weight: bold;
	}

	.rule-content {
		/* width: 90%;
		margin: 0 auto; */
		padding-bottom: 20rpx;
		border-bottom: 2rpx solid #f4f4f4;
	}

	.n-price-1 {
		height: 100rpx;
		color: #000000;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		align-items: center;
	}

	.countdown-area {
		width: 220rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		text-align: right;
		color: #f4e7db;
		/* background-image: linear-gradient(to right, #1e1a17,#4b3e36); */
		background-color: #4b3e36;
		height: 70rpx;
		border-radius: 50rpx 0rpx 0rpx 50rpx;
	}

	.register-to-receive {
		background-color: #eb5468;
		color: #ffffff;
		font-size: 30rpx;
		width: 360rpx;
		height: 86rpx;
		border: 2rpx solid #eb5468;
		border-radius: 10rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.register-to-receive-end {
		background-color: #ebebeb;
		/* color: #ebebeb; */
		font-size: 30rpx;
		width: 360rpx;
		height: 86rpx;
		border: 2rpx solid #ebebeb;
		border-radius: 10rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.goods-title-tag {
		color: #ffffff;
		background-color: #fa5650;
		border-radius: 6rpx;
		font-size: 26rpx;
		margin-right: 10rpx;
		vertical-align: middle;
		font-weight: 350;
		padding: 3rpx 10rpx;
	}

	.middile {
		vertical-align: middle;
	}
</style>